package com.example.q_kang.hhh.util;

import android.util.DisplayMetrics;
import android.view.View;
import android.widget.RelativeLayout;

import com.flyco.tablayout.widget.MsgView;

public class MsgViewUtil {

    public static void show(MsgView msgView, int num) {
        if (msgView == null) {
            return;
        }
        RelativeLayout.LayoutParams lp = (RelativeLayout.LayoutParams) msgView.getLayoutParams();
        DisplayMetrics dm = msgView.getResources().getDisplayMetrics();
        msgView.setVisibility(View.VISIBLE);
        msgView.setStrokeWidth(0);
        msgView.setText("");

        lp.width = (int) (8 * dm.density);
        lp.height = (int) (8 * dm.density);
        msgView.setLayoutParams(lp);
    }
}
